//
// Created by Tony on 2024/1/14.
//

#include "Name.h"
#include "../../../compiler/Visitor.h"
#include "../../../lexer/token/NameToken.h"

namespace Parser {

string Name::name() const {
    auto nameToken = static_pointer_cast<Lexer::NameToken>(token);
    return nameToken->getValue();
}

int32_t Name::accept(Compiler::Visitor* visitor) { return visitor->visit(this); }

} // namespace Parser
